<div class="bus_user">
	<div class="nav">
		<div class="nav-li focus">优惠券</div>
	</div>

	<hr />

	<div class="box">
		<a href="#personal/ticket">全部优惠券</a>
		<a href="#personal/ticket?state={{config.TICKET_STATE.未使用}}">未使用</a>
		<a href="#personal/ticket?state={{config.TICKET_STATE.已使用}}">已使用</a>
		<a href="#personal/ticket?state={{config.TICKET_STATE.已过期}}">已过期</a>
		<table class="paper-table">
			<thead>
                <td >券号</td>
                <td >优惠券名</td>
				<td >商家</td>
				<td >描述</td>
				<td >操作</td>
			</thead>
			{{#each $Cache.personal.ticket.list}}
			<tr>
                <td title="{{_id}}">
                    {{uid}}
                </td>
                <td>
                    {{ticket_factory.info.name}}
                </td>
				<td>{{bus_id}}</td>
				<td>{{ticket_factory.info.intro}}</td>
				<td>
				<i>无</i>
				</td>
			</tr>
			{{/each}}
		</table>

		<div class="get-ticket">
			<h4>领取优惠券</h4>
			<android:input label="请输入优惠券ID" value="{{$Cache.personal.ticket.ticket_factory_id}}" bind-input="{{'$Cache.personal.ticket.ticket_factory_id'}}"></android:input>
			<button event-click="{{'$Event.personal.ticket.ticket_add_from_factory'}}">领取</button>
		</div>
	</div>

</div>
<style>	
.bus_user .paper-table td{
		text-align: center;
}
</style>
